<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加入库</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
    <style>
        .el-input .el-input__inner,
        .el-input.is-disabled .el-input__inner,
        .el-textarea .el-textarea__inner,
        .el-textarea.is-disabled .el-textarea__inner {
            color: #000;
            background-color: #fff;
        }
    </style>
</head>

<body>
    <div id="app" class="minWidth">
        <el-form ref="form" :rules="rules" :model="formware">
            <el-descriptions class="margin-top" title="仓库设置" :column="3" border>
                <el-descriptions-item label="存货地点">
                    <el-form-item prop="Receipt_Type" style="display: flex;" width="150">
                        <el-select :disabled="true" v-model="formware.Receipt_Type" placeholder="请选择存货地点">
                            <el-option v-for="item in options" :disabled="item.disabled" :key="item.value"
                                :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="仓库">
                    <el-form-item prop="Store_SerialNumber" style="display: flex;" width="150">
                        <el-select :disabled="true" v-model="formware.Store_SerialNumber" placeholder="请选择仓库">
                            <el-option v-for="item in Wares" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
        </el-form>
        <el-form ref="form2" :rules="rules" :model="formware">
            <el-descriptions v-for="(item,i) in formware.Children.purchase_receipt_detail" class="margin-top"
                title="商品设置" :column="3" border>
                <el-descriptions-item label="商品名称">
                    <el-form-item style="display: flex;" width="150">
                        <el-input :disabled="true" :value="ArticleName(item.Purchase_Order_Detail_SerialNumber)" />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="入库数量">
                    <el-form-item :rules="{
                        required: true, message: '入库数量不能为空', trigger: 'blur'
                      }" :prop="'Children.purchase_receipt_detail.'+i+'.Receipt_Quantity'" style="display: flex;"
                        width="150">
                        <el-input :disabled="true" v-model="item.Receipt_Quantity" />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="商品单价">
                    <el-form-item style="display: flex;" width="150">
                        <el-input :disabled="true" v-model="item.Amount" />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="过期时间">
                    <el-form-item style="display: flex;" width="150">
                        <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="item.Expiration_Date" type="date" placeholder="选择日期">
                        </el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
        </el-form>
        <!-- <el-table border :data="formware.Children.purchase_receipt_detail" style="width: 100%">
            <el-table-column align="center" prop="Article_SerialNumber" label="商品流水号">
            </el-table-column>
            <el-table-column align="center" prop="Receipt_Quantity" label="入库数量">
            </el-table-column>
            <el-table-column align="center" prop="Amount" label="商品单价">
            </el-table-column>
        </el-table> -->
        <div style="width: 100%;display: flex;justify-content: center;position: fixed;bottom: 0;">
            <el-button @click="back()">返回</el-button>
            <el-button type="primary" :loading="loading" @click="Sumbit('form2')">确 定</el-button>
        </div>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/Addinbound.js"></script>
</body>

</html>